(* CardStack.pas *)

program CardStack;

uses nodes, stack;

var
   i	    : integer;
   t	    : link;

begin
   NodesNr := ReadData('InfoData.in'); (* czytanie danych dla elementow *)
   (* wkladanie elementow na stos *)
   for i := 1 to NodesNr do
      push(NodesTab[i]);
   (* sciaganie elementow ze stosu *)
   t := top;
   while t <> nil do
   begin
      print(t);
      t := t^.next;
   end;
end.
